<%@ page language="java" import=" com.scalar.chiptrack.utils.ConfigManager"%>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<chiptrack:checkLogon sourcePage="/operationCodeList.do"/>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<script src="<%=chipTracContext%>/jsp/includes/scripts/functions.js"></script>
<script src="<%=chipTracContext%>/jsp/includes/scripts/validations.js"></script>


<SCRIPT language="JavaScript">

function save()
{
    var oprCode      = document.operationCodeModify['oprCodeList[0].operationCode'];
    var oprCodedesc  = document.operationCodeModify['oprCodeList[0].oprationDesc'];
    var process      = document.operationCodeModify['oprCodeList[0].processType'];
    var pa	         = document.getElementById("message");
    pa.innerHTML     = "";

    if( oprCodedesc.value.trim() == '')
    {
        pa.innerHTML  = "<li>" + "Enter Code Full Description" + "</li>";
        oprCodedesc.value = '';
        oprCodedesc.focus();
        return;
    }

    document.operationCodeModify.oprCode.value = oprCode.value;
    document.operationCodeModify.oprCodeDesc.value = oprCodedesc.value;
    document.operationCodeModify.process.value = process.value;

    document.operationCodeModify.action="<%=chipTracContext%>/operationCodeList.do?action=save" ;
    document.operationCodeModify.submit();
}


</SCRIPT>

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>

<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<!-- Top Header Start-->

<%@ include file="/jsp/includes/header.jsp" %>

<!-- Top Header End-->

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
	<TD width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>

<!-- Side Navigation start -->

<%@ include file="/jsp/operations/dataentryMenu.jsp" %>

	</TD>
<!-- end of the side navigations -->

    <TD bgcolor="#ffffff">
    <IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
    <TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
    <TD valign="top" width="100%">

    <IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
    <BR>
    <!-- from here your body starts -->
    <center><span class="NArialW">Operation Codes Details</span></center>
    <img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20>
    <html:form name="operationCodeModify"  type="com.scalar.chiptrack.operations.dataentry.forms.OperationCodeEntryForm" action="/operationCodeList" >
    <table border="0" width="60%" align=center>
    <tr>
    <td colspan="3" class='NArialL'>&nbsp;<strong><FONT id="message" styleClass="NArialL" color='FF0000'></FONT></td>
    </tr>
    <tr>
        <td>
  	        <table border="0" width="100%" bordercolor="#FFFFFF" align=right>

	            <tr>
                    <td class="NArialL" colspan=3><IMG src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td>
                </tr>
                <tr>
                    <td width="17%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Operation Code</font></td>
                    <td width="26%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Code Full Description</font></td>
                    <td width="17%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Process</font></font></td>

                </tr>
                <nested:iterate id="oprCode" name="operationCodeEntryform" property="oprCodeList" indexId="iterateIdx" type= "com.scalar.chiptrack.operations.dataentry.OperationCodes" >
                <tr bgcolor='#DEE1E2'>
                    <td width="15%" align="center"><font class="NArialL"><nested:text name="oprCode" styleClass="txfield" property="operationCode" disabled="true"/></font></td>
                    <td width="17%" align="center"><font class="NArialL"><nested:text name="oprCode" styleClass="txfield" property="oprationDesc" maxlength="50" /></font></td>
                    <td width="17%" align="center"><font class="NArialL">
                        <nested:select name="oprCode"  styleClass="txfield" property="processType" >
                        <html:options collection="processList" property="label" labelProperty="label"></html:options>
                        </nested:select></font>
                    </td>
                </tr>
                <input type="hidden" name="oprCode" value="">
                <input type="hidden" name="oprCodeDesc" value="">
                <input type="hidden" name="process" value="">
               </nested:iterate>
            </table>
            <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width="10" height=10></td></tr>
            <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width="10" height=10></td></tr>
            <tr>
                <td align="center" colspan='3'>
                    <a href="javascript:save();"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" width="53" height="17" onmouseover="window.status='Click here to modify Operation code details';return true" onmouseout="window.status='';return true" title="Click here to modify opration code details"></a>
                    <a href="<%=chipTracContext%>/operationCodeList.do"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/back.gif" width="43" height="17" onmouseover="window.status='Click here to go Back';return true" onmouseout="window.status='';return true" title="Click here to go Back"></a>
                </td>
            </tr>
    <!-- till here -->
    <BR><BR><BR></TD>
    <TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
    </TR>
    </TABLE>
    </td>
    </tr>
</table>
</html:form>

<!-- Footer starts here -->

<%@ include file="/jsp/includes/footer.jsp" %>

<!-- footer end here -->

</BODY>
</HTML>
